package com.practice.springboot_01_zwj.entity.vo;

/**
 * ClassName:Result <br/>
 * Description:枚举类保存状态码和提示信息 <br/>
 * date:2024/1/17 10:15 <br/>
 *
 * @Author ycy <br/>
 * @Version v1.0<br />
 * @Since <br/>
 */
public enum Result {
    SUCCESS(200, "成功"),
    SUCCESS_LOGIN(200, "登录成功"),
    WITHOUT_ACCOUNT(500, "用户名或密码错误"),
    ACCOUNT_LOGOUT(500, "账号已注销"),
    CODE_ERROR(500, "验证码错误"),
    PASS_ERROR(500, "密码错误"),
    FAILS(500, "操作失败"),
    INVALID_PARAM(400,"参数错误" );

    private final int code;
    private final String msg;

    Result(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
